//
//  BoxCostHeadView.m
//  XLDoctor
//
//  Created by longma on 2018/10/8.
//  Copyright © 2018年 XLH. All rights reserved.
//

#import "MJNavBarView.h"

@implementation MJNavBarView


- (void)awakeFromNib{
    [super  awakeFromNib];

    [self.btnBack setImage:[UIImage imageNamed:@"icon_back_white"] forState:UIControlStateNormal];
    
    self.rightImvTitleView.hidden = true;
    
}
- (void)setNavType:(NAVTYPE)navType {
    _navType = navType;
    if(navType == NavTypeWhite){
        [self.btnBack setImage:[[UIImage imageNamed:@"icon_back"] mj_imageChangeColor:UIColor.mj_whiteColor] forState:0];
        [self.btnRight setImage:[UIImage imageNamed:@"icon_quanbujiliu"] forState:UIControlStateNormal];
        self.viewBg.backgroundColor = UIColor.clearColor;
        self.labTitle.textColor = UIColor.mj_whiteColor;
        [self.btnRight setTitleColor:UIColor.mj_whiteColor forState:0];
    }
    if(navType == NavTypeGray){
        [self.btnBack setImage:[UIImage imageNamed:@"icon_back"] forState:0];
        [self.btnRight setImage:[UIImage imageNamed:@"icon_jiance12"] forState:UIControlStateNormal];
        self.viewBg.backgroundColor = UIColor.mj_whiteColor;
        self.labTitle.textColor = UIColor.mj_blackColor;
        [self.btnRight setTitleColor:UIColor.mj_blackColor forState:0];
    }
    if(navType == NavTypeBlack){
        [self.btnBack setImage:[UIImage imageNamed:@"icon_back"] forState:0];
        [self.btnRight setImage:[UIImage imageNamed:@"icon_jiance12"] forState:UIControlStateNormal];
        self.viewBg.backgroundColor = UIColor.mj_whiteColor;
        self.labTitle.textColor = UIColor.mj_blackColor;
        [self.btnRight setTitleColor:UIColor.mj_blackColor forState:0];
    }
    
}

- (void)setShowClose:(BOOL)showClose {
    _showClose = showClose;
    
    if(showClose){
        [self.btnBack setImage:[MJUIImageMake(@"icon_quxiao") mj_imageChangeColor:UIColor.mj_whiteColor] forState:0];
    }else{
        [self.btnBack setImage:[[UIImage imageNamed:@"icon_back"] mj_imageChangeColor:UIColor.mj_whiteColor] forState:0];
    }
    
}

@end
